const crypto = require('crypto');


module.exports = {
    "secretKey": "love",
    "algorithms": ["HS256"],
    "unless": { //排除
        path: [
            //  \转义符
            /^\/users\/.*/, "/favicon.ico/", "/upload", /^\/images\/.*/, /^\/shops\/.*/, /^\/snap\/.*/, /^\/types\/.*/,
            "/getFrontToken", "/getToken"

        ]
    },
    // 这个是session的
    sha256(str) {
        let sha = crypto.createHash('sha256');
        return sha.update(str).digest('hex');
    }
}